package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select substring(u.username,1,1) " +
            "from user u " +
            "join registration r on r.user_id=u.id " +
            "where r.event_id=${eventId}")
    List<String> getUserList(Integer eventId);
}
